﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DebugTools
{
    class PM_Chroma:PowerMeter
    {
        public PM_Chroma(string szInsID):base(szInsID)
        {
            _szType = "Chroma ATE,6620";
        }

        public override bool Init()
        {
            this._ListInitCmd.Add("*CLS\n");
            this._ListInitCmd.Add("*RST\n");
            this._ListInitCmd.Add("VOLT:RANG AUTO\n");
            this._ListInitCmd.Add("CURR:SHUN AUTO\n");
            this._ListInitCmd.Add("CURR RANG AUTO\n");
            this._ListInitCmd.Add("THD:MODE ORDER;ORD 41\n");
            this._ListInitCmd.Add("FILT OFF\n");
            this._ListInitCmd.Add("MEAS:MODE AVERAGE;AVERAGE 3\n");
            return base.Init();
        }

        public override double Meas_Volt()
        {
            _szCmd = "MEAS:VOLT:RMS?\n";
            return base.Meas_Volt();
        }

        public override double Meas_Curr()
        {
            _szCmd = "MEAS:CURR:RMS?\n";
            return base.Meas_Curr();
        }

        public override double Meas_Power()
        {
            _szCmd = "MEAS:POW:REAL?\n";
            return base.Meas_Power();
        }
    }
}
